<template>
  <el-card :body-style="{ 'min-height': '180px' }">
    <template slot="header">
      <slot name="title">
        <SmartTitle :title="title">
          <slot slot="title-right" name="title-right"></slot>
        </SmartTitle>
      </slot>
      <span v-if="$slots.title" class="title-right">
        <slot name="title-right"></slot>
      </span>
    </template>
    <slot></slot>
  </el-card>
</template>
<script>
import SmartTitle from "@/components/SmartTitle";
export default {
  components: { SmartTitle },
  props: {
    title: {
      type: String,
      default: "",
    },
  }
};
</script>
<style scoped lang="scss">
.el-card {
  margin: 10px;
  ::v-deep .el-card__header {
    font-size: 15px;
    font-weight: 600;
    height: 43px;
    border-bottom: 0;
    position: relative;

    .title-right {
      float: right;
      font-weight: 500;
    }
  }
}
</style>
